package com.cby.springboot.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class BaseController {

    private Logger logger = null;

    public void initLogger() {
        logger = LoggerFactory.getLogger(this.getClass());
    }

    public void logI(String msg) {
        if(logger  == null) {
            initLogger();
        }
        logger.info(msg);
    }
}
